<?php

/**
 * IndexController - Index
 *
 * @author Fernando Dias Oliveira <rodox17@gmail.com>
 * @package intranet
 * @subpackage controller
 */

class VideoController extends AppBaseController 
{
	public function init()
	{
		parent::init();		
	}

    public function indexAction() 
    {
		 
$yt = new Zend_Gdata_YouTube();
$query = $yt->newVideoQuery();
$query->videoQuery = 'cat';
$query->startIndex = 10;
$query->maxResults = 20;
$query->orderBy = 'viewCount';
echo $query->queryUrl . "\n";
$videoFeed = $yt->getVideoFeed($query);
 
foreach ($videoFeed as $videoEntry) {
   echo "---------VIDEO----------\n";
   echo "Title: " . $videoEntry->getVideoTitle() . "\n";
   echo "\nDescription:\n";
   echo $videoEntry->getVideoTitle();
   echo "\n\n\n";
}
exit;
		
    }
}

?>